package com.maserb.monitor.service.author_manage.impl;

import com.maserb.monitor.entity.Function;
import com.maserb.monitor.repository.FunctionRepository;
import com.maserb.monitor.service.author_manage.FunctionService;
import com.maserb.monitor.service.base.impl.JpaSpecificationServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class FunctionServiceImpl extends JpaSpecificationServiceImpl<FunctionRepository, FunctionRepository, Function, String>
        implements FunctionService {

    @Autowired
    private FunctionRepository repository;

    public List<Function> findAllMenu() {
        return repository.findByFunctionTypeOrderByFunctionOrder((short)0);
    }

}